#ifndef _ESP8266_MQTT_H
#define _ESP8266_MQTT_H

#include "musart2.h"

#define MQTT_TOPIC_DEVICE_RECV  "topic/device/recv"
#define MQTT_TOPIC_DEVICE_SEND  "topic/device/send"

#define WIFI_RST_PIN   GPIO_PIN_4
#define WIFI_RST_PORT  GPIOA

typedef struct{
	int len;
	char json[256];

}mqtt_recv_t;


uint8_t mqtt_init(void);
uint8_t mqtt_subscribe(char *topic, uint8_t Qos);
uint8_t mqtt_unsubscribe(char *topic);
uint8_t mqtt_close(char *topic);
uint8_t mqtt_publish(char *topic, char *msg);














#endif

